{literal}
<script language="JavaScript">

window.addEvent('domready', function() {
	var textarea = $('q');
	textarea.focus();
	// Here we start adding events to textarea.
	// Note that 'focus' and 'keyup' are native events, while 'burn'
	// is a custom one we've made
	textarea.addEvents({
		keyup: q
	});
});

function q() {

	var indicator = $('process');
	var textarea = $('q');

	indicator.style.visibility = 'visible';
	
	var req = new Request.HTML({   
        method: 'get',   
        url: '{/literal}{$Sys_CurrentPageURL}{literal}&method=ajaxSearch&q=' + textarea.value,   
        onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			indicator.style.visibility = 'hidden';
		}

    }).send();
    
}
</script>


{/literal}

<div id="cms">
<table width="100%">
   <th width="280">Suchen</th>
   <th width="100%"></th>
   <th width="30"></th>
   <tr class="first">
		<td nowrap>Benutzer oder Gruppennamen eingeben:</td>
		<td>
			<input type="text" name="q">
		</td>
		<td nowrap width="50"><img id="process" src="{$Sys_DesignSharedPath}/images/indicator_big.gif" width="20" height="20" style="visibility: hidden; " ></td>
	</tr>
</table>
<br>
<div id="result">
</div>
</div>